 {include file="public/header"}
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="ibox-content">
         <form action="" method="post" enctype="multipart/form-data" id="cform">
               <input type="hidden" name="id" value="{$authrules.id}">
               <div class="form-horizontal">
	
               <div class="form-group">
                    <label class="col-sm-2 control-label">归属：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <select style="width: 530px;height: 35px;" name="pid">
                                    <option value="0">顶级权限</option>
                                    {volist name="authruleRes" id="authrule"}
                                    <option value="{$authrule.id}"  {if condition="$authrule['id'] eq $authrules.pid "} selected{/if} > 
                                        {$authrule.title}
                                    </option>
                                    {/volist}
                                </select>
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error">请填写权限的上级权限</p>
	                         </div>
                        </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">权限名称：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <input type="text" class="form-control" value="{$authrules.title}" name="title">
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error">请填写权限的名称，如：商品添加</p>
	                         </div>
                        </div>
                </div>
                	
                 <div class="form-group">
                    <label class="col-sm-2 control-label">控/方：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <input class="form-control" type="text" value="{$authrules.name}" name="name">
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error">请填写控制器和方法的名称，如：goods/add</p>
	                         </div>
                        </div>
                 </div>	
                 
				 
                 <div class="form-group">
                    <label class="col-sm-2 control-label">是否显示：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <label class="radio-inline"> <input type="radio" name="status" value="0" {if condition="$authrules['status'] eq 0"}checked="checked"{/if} > 否</label>
                                    <label class="radio-inline"> <input type="radio" name="status" value="1" {if condition="$authrules['status'] eq 1"}checked="checked"{/if}> 是</label>
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error">是否显示在左边菜单栏</p>
	                         </div>
                        </div>
                 </div>	
				 
                 <div class="form-group">
                    <label class="col-sm-2 control-label">ICON图标：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <input class="form-control" type="text" value="{$authrules.icon}" name="icon">
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error">请填写字体图标的名称，如：fa fa-home</p>
	                         </div>
                        </div>
                 </div>	 

                 <div class="form-group">
                    <label class="col-sm-2 control-label">排序：</label>
                        <div class="col-md-10">
	                        <div class="col-md-5">
                                <input class="form-control" type="text" value="{$authrules.sort}" name="sort">
	                        </div>
	                        <div class="col-md-5  ">
	                            <p class="validate-error"> 数字越小越在前面，如：50</p>
	                         </div>
                        </div>
                 </div>	 

                   <div class="form-group" style="padding:30px;" >
				          <div class="col-sm-4 col-sm-offset-2" style="margin-top:30px;">
				            <button type="submit" class="btn btn-primary" >确定</button>
				            <a href="javascript:history.back(-1);" role="button"  class="btn btn-default" style="margin-left: 10px;">返回</a> 
				          </div>
				   </div>
                    
                  </div>  
                </form>
            </div>
        </div>
{include file="public/footer"}
<script>
  var uploader= {}; 
 jQuery(function ($) { 
//验证规则
    var validate_rules = {
        'auth_title': {required: true,minlength: 1,maxlength:52},
    };
    //绑定form的ajax提交
    bindForm($('form#cform'),validate_rules); 
 }); 
	 
</script>